<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0">
		<meta-equiv="Pragma"content="no-cache">
		<meta-equiv="Cache-Control"content="no-cache">
		<meta-equiv="Expires"content="0">
		<title>《老广共同睇》全国两会特别报道</title>
		<link rel="stylesheet" href="http://g4cdn.airefp.com{$_C.hy_path}css/npc/lianghui.css" />
		<link rel="stylesheet" href="http://g4cdn.airefp.com{$_C.hy_path}css/npc/pulie.css" />
	</head>
	<body>
		<div class="banner" id="content"><img src="http://g4cdn.airefp.com/ws{$npc.img_url}"></div>
		<div class="htile"><h1>{$npc.title}</h1></div>
		<div class="h3tile"><h2>{$npc.content}</h2></div>
		<div class="icon">
			<img src="http://g4cdn.airefp.com{$_C.hy_path}images/npc/Vector Smart Object.png"><p>{$npc.comment_num|default:0}</p>
		    <img src="http://g4cdn.airefp.com{$_C.hy_path}images/npc/yan.png"><p>{$npc.see_num|default:0}</p>
		</div>
		<div class="xian"></div>
		<div class="tenan">{$npc.des_content}</div>
		<div class="pulie">
			<div class="lick" data-nid="{$npc.id}" >
				<img src="http://g4cdn.airefp.com{if $npc.is_liked eq '1'}{$_C.hy_path}images/npc/iconxih.png{else}{$_C.hy_path}images/npc/iconlick.png{/if}">
				<span>{$npc.like_num|default:0}喜欢</span>
			</div>
			<div class="feng">
				<img src="http://g4cdn.airefp.com{$_C.hy_path}images/npc/iconfen.png">
				<span id="fen">{$npc.forward_num|default:0}分享</span>
			</div>
		</div>
		<div class="pingl">
			<span>精选评论</span>
			<div class="xians" id="xians"></div>
			{foreach from=$npc.comment_list item = comment}
			<div class="userliu">
				<div class="toux"><img src="{$comment.headimgurl}"></div>
				<div class="nameping">
					<h2>{$comment.nickname}</h2>
					<span>{$comment.comment}</span>
				</div>
			</div>
			{/foreach}
		</div>
		<div class="dingbu"><a onClick="goDiv('content')" id="toTop"><img src="http://g4cdn.airefp.com{$_C.hy_path}images/npc/fangh.png"></a></div>
		<div class="pingkuan  ub ub-ac ub-pj">
			<textarea id="cmText" placeholder="写下你的精彩评论"></textarea>
			<a href="javascript:;" onclick="sendComment()" class="send-btn ub-f1">发送</a>
		</div>
		<script type="text/javascript" src="http://g4cdn.airefp.com/ws/Mobile/Webroot/gf/js/jquery-1.10.2.min.js" ></script>
		<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<script>
		var hy_path = 'http://g4cdn.airefp.com{$_C.hy_path}',npc_id = parseInt('{$npc.id}'),share_num = parseInt('{$npc.forward_num}')
		function goDiv(div) {
			var a = $("#"+div).offset().top;
			$("html,body").animate({
				scrollTop:a
				}, 'slow'); 
		}
			  wx.config({
			    debug: false, 
			   appId: '{$jsdk.appId}',
					timestamp: {$jsdk.timestamp},
					nonceStr: '{$jsdk.nonceStr}',
					signature: '{$jsdk.signature}',
			    jsApiList: [
			      // 所有要调用的 API 都要加到这个列表中
				  'onMenuShareTimeline',
		      	  'onMenuShareAppMessage',

			    ]
			  });
			  wx.ready(function () {
				
				 wx.onMenuShareTimeline({
					    title: '《老广共同睇》全国两会特别报道',
					     link:'http://g4.airefp.com/ws/index.php?g=mobile&m=npc&a=index&id={$npc.id}',
					     imgUrl: 'http://g4cdn.airefp.com/ws/Static/npc/share-info.png',
					      trigger: function (res) {
					       
					      },
					      success: function (res) {
					    	  successShare();
					      },
					      cancel: function (res) {
					       
					      },
					      fail: function (res) {
					        warn(JSON.stringify(res));
					      }
				    });
				    
					wx.onMenuShareAppMessage({
					    link:'http://g4.airefp.com/ws/index.php?g=mobile&m=npc&a=index&id={$npc.id}',
					     title: 'G4全国两会特别报道',
					    desc: '《老广共同睇》全国两会特别报道',
					  	imgUrl: 'http://g4cdn.airefp.com/ws/Static/npc/share-info.png',
					    success: function () { 
					    	successShare();
					    },
					    cancel: function () { 
					        // 用户取消分享后执行的回调函数
					    }
					});
			  });
			 function successShare()
			 {
				var url="index.php?g=mobile&m=npc&a=addShareNum&id={$npc.id}";
				$.post(url,{
					
				},function(res){
					share_num++;
					$("#fen").html(share_num+"分享");
				},"json");
			 }
		</script>
		<script type="text/javascript" src="{$_C.hy_path}js/npc/liang.js" ></script>
	</body>
</html>